<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/include.inc.jsp"%>

<div class="pageContent">
	
	<form method="post" action="${ctx}/login" class="pageForm" onsubmit="return validateCallback(this, loginDialogDone)">
	<%-- 指定为ajax请求 --%>
		<input type="hidden" name="ajax" value="true"/>
		<div class="pageFormContent" layoutH="57">
			<p>
				<label>用户名：</label>
				<input type="text" name="username" size="20" class="login_input" />
			</p>
			<p>
				<label>密码：</label>
				<input type="password" name="password" size="20" class="login_input" />
			</p>
			<p>
				<span style="color:red" id="errror"></span>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">登录</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>
<script>
function loginDialogDone(data) {
	if (data.statusCode == 'error') {
		$("#errror").html(data.message);
	}else
	{
		$.pdialog.closeCurrent();
		navTab.reload();
	}
}
</script>